package cn.kgc.easybuy.dao;

import cn.kgc.easybuy.pojo.Address;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: yingzi-wants-to-sleep
 * @description:
 * @author: 敖成
 * @create: 2025-09-16 17:07
 **/
@Mapper
@Repository
public interface AddressMapper {
    List<Address> selectAllAddress();

    List<Address> selectAddressByUserId(int userId);

    Address selectAddressById(int id);

    Address selectDefaultAddress(int userId);

    int addAddress(Address address);

    int updateAddress(Address address);

    int deleteAddressById(int id);

    int updateDefaultAddress(int userId);

}
